package com.example.test.service;

import com.example.test.service.build.UserInfo;
import org.springframework.stereotype.Component;

@Component
public class UserInfoBuild {

    private UserInfo userInfo;

    public UserInfoBuild buildBase() {
        userInfo = new UserInfo();
        userInfo.setName("fl");
        userInfo.setCode("123456");
        return this;
    }

    public UserInfoBuild build1() {
        userInfo.setPas("123");
        return this;
    }
    public UserInfoBuild build2() {
        userInfo.setPu("09");
        return this;
    }

    public UserInfo build() {
        return userInfo;
    }
}
